<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title>新增采购价格</title>
		<link rel="stylesheet" type="text/css" href="css/public.css">
		<script type="text/javascript" charSet="UTF-8" src="js/sorttable.js"></script>
		<script language="JavaScript" charSet="UTF-8" src="js/public.js"></script>
		<script type="text/javascript" charSet="UTF-8" src="js/validate.js"></script>
		<script type="text/javascript">
			function validate()
			{
			//订货量从	
			var from = document.getElementById("from");
			//订货量到
			var to = document.getElementById("to");
			//报价
			var bid = document.getElementById("bid");
			//最高限价
			var topbid = document.getElementById("topbid");
					
			//验证订货量从
			if(!isNotNull(from,'订货量从')||!f_check_float(from,'订货量从')||!f_check_NumLength(from,'订货量从'))
				return false ;
					
			//验证订货量到
			if(!(isNotNull(to,'订货量到')&&f_check_ZhOrNumOrLett(to,'订货量到'))||!f_check_NumLength(to,'订货量到'))
				return false ;	
				
			//验证报价
			if(!(isNotNull(bid,'报价')&&f_check_ZhOrNumOrLett(bid,'报价'))||!f_check_NumLength(bid,'报价'))
				return false ;	
			//验证最高报价		
			if(!(isNotNull(topbid,'最高报价')&&f_check_ZhOrNumOrLett(topbid,'最高报价'))||!f_check_NumLength(topbid,'最高报价'))
				return false ;	
		}		
		</script>
	</head>

	<body>
		<div id="info_all" style="width: 455px;">
			<div id="info_top">
				新增采购价格
			</div>
			<div style="padding: 4px; width: 450px; margin-top: 6px;">
				<s:form action="addStockPrice.action" method="post" theme="simple" onsubmit=" return validate()">
					<table
						style="margin-top: 10px; background: #fbfbfb; color: #403040;"
						align="center">
						<tr>
							<td width="80px">
								物料名称：
							</td>
							<td>
								
								<s:hidden name="pbaseStockPriceModel.stockPriceId"></s:hidden>
								<s:hidden name="pbaseStockPriceModel.PBaseVerifyprojectMaterialId" id="materialId"></s:hidden>
								<s:textfield name="stockPriceDTO.materialModel.materialName" size="12" id="materialName" readonly="true"></s:textfield><img src="images/kookup.gif" style="cursor:pointer" onclick="openWin('materialAction.action','material',750,700,0)">
							</td>
							<td width="80px">
								供应商：
							</td>
							<td>
								<s:hidden name="pbaseStockPriceModel.PBaseVerifyprojectSupplierId" id="supplierId"></s:hidden>
								<s:textfield name="stockPriceDTO.supplierModel.supplierName" size="12" id="supplierName" readonly="true"></s:textfield><img src="images/kookup.gif" style="cursor:pointer" onclick="openWin('supplierSelect.action','supplier',750,700,0)">
							</td>
						</tr>
						<tr>
							<td width="80px">
								订货量(从)：
							</td>
							<td>
								<s:textfield name="pbaseStockPriceModel.stockNumberFrom" size="12" id="from"></s:textfield>
							</td>
							<td width="100px">
								订货量(到)：
							</td>
							<td>
								<s:textfield name="pbaseStockPriceModel.stockNumberTo" size="12" id="to"></s:textfield>
							</td>
						</tr>
						<tr>							
							<td width="100px">
								报价：
							</td>
							<td>
								<s:textfield name="pbaseStockPriceModel.bid" size="12" id="bid"></s:textfield>
							</td>
							<td width="100px">
								最高限价：
							</td>
							<td>
								<s:textfield name="pbaseStockPriceModel.topBid" size="12" id="topbid"></s:textfield>
							</td>
						</tr>
						<tr>
							<%--<td width="80px">
								审核状态：
							</td>
							<td>
								<s:textfield name="pbaseStockPriceModel.auditState" size="12" readonly="true"></s:textfield>
							</td>
							--%><td width="80px">
								备注：
							</td>
							<td>
								<s:textfield name="pbaseStockPriceModel.memo" size="12"></s:textfield>
							</td>
						</tr>
						<tr>

						</tr>
						<tr>
							<td></td>
							<td align="center">

								<input type="submit" value="保存"  onFocus="this.blur()"
									onmouseover="this.className='btnover'"
									onmouseout="this.className='btnout'" class="btnsize" />



							</td>
							<td colspan="2">
								<div style="margin: 6px; text-align: left;">

									<input type="button" value="返回" onClick="javascript:history.back()"
										onFocus="this.blur()" onmouseover="this.className='btnover'"
										onmouseout="this.className='btnout'" class="btnsize" />
								</div>
							</td>
						</tr>
					</table>
				</s:form>
			</div>
		</div>

	</body>
</html>
